﻿<%@ Control language="C#" Inherits="AdvertMana.ViewAdvert" CodeFile="ViewAdvert.ascx.cs" AutoEventWireup="true"%>
<%@ Register Src="../../controls/tm_TreeViewAdv.ascx" TagName="tm_TreeViewAdv" TagPrefix="uc1" %>
<%@ Register TagPrefix="dnn" TagName="Audit" Src="~/controls/ModuleAuditControl.ascx" %>
<center>
    <asp:Panel ID="pnlResultSearch" runat="server" Width="100%">
        <table border="0" width="100%" class="table">
            <tr>
                <td colspan="3" align="left">
                    <asp:Label ID="lblCheckAll" runat="server"   Text="Chọn tất cả :" CssClass="titletext3"></asp:Label>
                    <asp:CheckBox ID="cbxCheckAll" runat="server" AutoPostBack="True" OnCheckedChanged="cbxCheckAll_CheckedChanged" /></td>
            </tr>
            <tr>
                <td colspan="3">
                    <asp:GridView ID="gvResultSearch" runat="server" AllowPaging="True" AllowSorting="True"
                        AutoGenerateColumns="False" DataKeyNames="advertId" DataSourceID="dsResultSearch" OnDataBound="gvResultSearch_DataBound"
                        OnPageIndexChanging="gvResultSearch_PageIndexChanging" OnSorting="gvResultSearch_Sorting"
                        Width="100%" CssClass="table">
                        <Columns>
                            <asp:TemplateField>
                                <ItemStyle HorizontalAlign="Center" Width="20px" />
                                <ItemTemplate>
                                    <asp:CheckBox ID="cbxCheck" runat="server" />
                                    <asp:Label ID="lbladvertId" runat="server" Text='<%# Eval("advertId") %>' Visible="False"></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="M&#244; tả" SortExpression="description">
                                <EditItemTemplate>
                                    <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("description") %>'></asp:TextBox>
                                </EditItemTemplate>
                                <HeaderStyle HorizontalAlign="Center" />
                                <ItemTemplate>
                                    <asp:HyperLink ID="HyperLink3" runat="server" NavigateUrl='<%# getURL(DataBinder.Eval(Container, "DataItem.advertId").ToString()) %>'><%# DataBinder.Eval(Container, "DataItem.description") %></asp:HyperLink>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="description1" HeaderText="Trạng th&#225;i" SortExpression="description1">
                                <ItemStyle HorizontalAlign="Center" Width="100px" />
                                <HeaderStyle HorizontalAlign="Center" />
                            </asp:BoundField>
                            <asp:TemplateField HeaderText="Ng&#224;y đăng" SortExpression="createDate">
                                <ItemStyle HorizontalAlign="Center" Width="120px" />
                                <HeaderStyle HorizontalAlign="Center" />
                                <ItemTemplate>
                                    <asp:Label ID="Label1" runat="server" Text='<%# ((DateTime)DataBinder.Eval(Container, "DataItem.createDate")).ToShortDateString() %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                        <PagerStyle HorizontalAlign="Right" />
                        <PagerSettings Mode="NumericFirstLast" />
                    </asp:GridView>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <asp:Label ID="lblSetStatus" runat="server"   Text="Thiết lập trạng thái :" CssClass="titletext3"></asp:Label><asp:DropDownList
                        ID="ddlSetStatus" runat="server" AppendDataBoundItems="True">
                    </asp:DropDownList><asp:Button ID="btnAgree" runat="server"  
                        OnClick="btnAgree_Click" Text="Đồng ý" CssClass="btn" Width="84px" />
                    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
                    &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
                    <asp:Button ID="btnDelete" runat="server" Text="Xóa chọn" CssClass="btn" OnClick="btnDelete_Click" Width="71px" /></td>
                <td colspan="1" style="text-align: right">
                    </td>
            </tr>
            <tr>
                <td colspan="3" class="table">&nbsp;</td>
            </tr>
        </table>
        <asp:SqlDataSource ID="dsResultSearch" runat="server"></asp:SqlDataSource>
    </asp:Panel>
</center>
<center>
<asp:Panel ID="pnlSearchAdvert" runat="server" Width="100%">
    <table border="0" class="table" width="100%">
        <tr>
            <td width="10%">
            </td>
            <td width="15%">
                <asp:Label ID="Label2" runat="server"   Text="Tài khoản :" CssClass="titletext3"></asp:Label></td>
            <td>
                <asp:TextBox ID="tbxAccount" runat="server" MaxLength="15"></asp:TextBox></td>
        </tr>
        <tr>
            <td>
            </td>
            <td><asp:Label ID="Label3" runat="server" Text="Trạng thái :"   CssClass="titletext3"></asp:Label></td>
            <td>
                <asp:DropDownList ID="ddlStatus" runat="server" AppendDataBoundItems="True">
                </asp:DropDownList></td>
        </tr>
        <tr>
            <td>
            </td>
            <td>
                <asp:Label ID="Label9" runat="server"   Text="Vị trí :" CssClass="titletext3"></asp:Label></td>
            <td>
                <asp:DropDownList ID="ddlPosition" runat="server">
                    <asp:ListItem Value="All">(Tất cả)</asp:ListItem>
                    <asp:ListItem Value="1">Tr&#225;i</asp:ListItem>
                    <asp:ListItem Value="2">Phải</asp:ListItem>
                    <asp:ListItem Value="3">Giữa</asp:ListItem>
                    <asp:ListItem Value="4">Tr&#234;n</asp:ListItem>
                    <asp:ListItem Value="5">Dưới</asp:ListItem>
                    <asp:ListItem Value="6">Lề tr&#225;i</asp:ListItem>
                    <asp:ListItem Value="7">Lề phải</asp:ListItem>
                </asp:DropDownList></td>
        </tr>
        <tr>
            <td>
            </td>
            <td>
                <asp:Label ID="lblPage" runat="server" CssClass="titletext3" Text="Trang :"></asp:Label></td>
            <td>
                <asp:DropDownList ID="ddlPage" runat="server">
                </asp:DropDownList></td>
        </tr>
        <tr>
            <td>
            </td>
            <td><asp:Label ID="Label5" runat="server" Text="Mô tả :"   CssClass="titletext3"></asp:Label></td>
            <td><asp:TextBox ID="tbxDesc" runat="server" MaxLength="255" Width="250px"></asp:TextBox></td>
        </tr>
        <tr>
            <td>
            </td>
            <td>
                <asp:Label ID="Label6" runat="server" Text="Thời gian :"   CssClass="titletext3"></asp:Label></td>
            <td>
                <asp:TextBox ID="tbxFromDate" runat="server" Width="80px"></asp:TextBox><asp:HyperLink ID="hlkFromDate" runat="server" ImageUrl="~/images/CalendarAJ.png"></asp:HyperLink><asp:TextBox ID="tbxToDate" runat="server" Width="80px"></asp:TextBox><asp:HyperLink ID="hlkToDate" runat="server" ImageUrl="~/images/CalendarAJ.png"></asp:HyperLink></td>
        </tr>
        <tr>
            <td>
            </td>
            <td>
            </td>
            <td>
                <asp:Button ID="btnList" runat="server" Text=" Tìm kiếm"   ValidationGroup="a" Width="90px" OnClick="btnList_Click" CssClass="btn" /><asp:Button ID="btnclear" runat="server" Text="Làm lại"   Width="90px" OnClick="btnclear_Click" CssClass="btn" /><asp:Button ID="btnNew" runat="server" Text="Thêm mới"   Width="90px" OnClick="btnNew_Click" CssClass="btn" /></td>
        </tr>
        <tr>
            <td>
            </td>
            <td>
                </td>
            <td>
               <asp:Label ID="lblNotice" runat="server" CssClass="titleText3"></asp:Label></td>
        </tr>
        <tr>
            <td colspan="3" class="table">
                &nbsp;</td>
        </tr>
        <tr>
            <td>
            </td>
            <td colspan="2">
                <asp:LinkButton ID="btnActivityCat" runat="server" CssClass="titletext3" OnClick="btnActivityCat_Click">Tìm trong các lĩnh vực </asp:LinkButton></td>
        </tr>
        <tr>
            <td colspan="1">
            </td>
            <td colspan="2">
                <uc1:tm_TreeViewAdv ID="tvActivityCat" runat="server" Visible="false" />
            </td>
        </tr>
    </table>
    <asp:Label ID="lblSearchCount" runat="server" CssClass="titleText3"></asp:Label></asp:Panel>
    </center>
<center>
    &nbsp;<asp:Label ID="lblDebugMessage" runat="server" CssClass="titleText3"></asp:Label></center>
